#include <REGX52.H>
#include "Nixie.H"
#include "Timer0.H"


unsigned char Sec,Min,Hour;
unsigned char SecP,MinP,HourP;

void main()
{
	Timer0_Init();
		if(Sec>=10)
		{
			Sec=0;
			SecP++;
		}
		if(SecP>=6)
		{
			SecP=0;
			Min++;
		}

	while(1)
	{
		
		Nixie(8,Sec);
//		Nixie(7,SecP);
	}

}
		

	




void Timer0_Routine() interrupt 1 //中断函数
{	
	static unsigned int Timecount;//中断变量,static 静态变量。
	
	TL0 = 0x18;		//设置定时初值
	TH0 = 0xFC;		//设置定时初值
	Timecount++;//时间每1ms自增1

	if(Timecount>=1000)//计时器1s后归零
	{
		Timecount=0;//计时器清零
		Sec++;
	}


}	




